function getPostsFromExternalSource($user, $count)
{
  $curl = curl_init("http://$user.blip.pl/feed");
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  $data = curl_exec($curl);
  curl_close($curl);
  $dataxml = new SimpleXMLElement($data);
  
  if($dataxml && $dataxml->entry){
    $user = $dataxml->author->name;
    $result = array();
    foreach($dataxml->entry as $entry){
      $result[] = array(
        'autor' => $user,
        'tresc' => $entry->title,
        'data' => $entry->updated
      );
      if(--$count <= 0) break;
    }
    return $result;
  }
  return array();
}